<?php
/**
{
    "courseAppointmentId": "INT //ID",
    "courseId": "INT //课程@foreign::tbl_course; @search",
    "schoolId": "INT //机构@foreign::tbl_school; @search; ",
    "uid": "INT //用户@foreign::tbl_user; @search; @noLoad; ",
    "date": "DATE //预约日期@search; @noList; ",
    "time": "VARCHAR //预约时间@search; @noList; ",
    "dateAndTime": "DATETIME //预约时间",
    "mobile": "VARCHAR //手机@search; ",
    "name": "VARCHAR //称呼@search; ",
    "ip": "VARCHAR //ip@noLoad; @hide; ",
    "status": "TINYINT //状态@status; 3::有效::@admin; 4::核销; 7::过期; 88::删除::@admin; @search; ",
    "created": "DATETIME //创建日期"
}
 */

class CourseAppointment extends Base
{
    
	private $courseAppointmentId= '';//ID
	private $courseId= '';//课程@foreign::tbl_course;@search
	private $schoolId= '';//机构@foreign::tbl_school;@search;
	private $uid= '';//用户@foreign::tbl_user;@search;@noLoad;
	private $date= '';//预约日期@search;@noList;
	private $time= NULL;//预约时间@search;@noList;
	private $dateAndTime= NULL;//预约时间
	private $mobile= NULL;//手机@search;
	private $name= NULL;//称呼@search;
	private $ip= NULL;//ip@noLoad;@hide;
	private $status= "3";//状态@status;3::有效::@admin;4::核销;7::过期;88::删除::@admin;@search;
	private $created= 'CURRENT_TIMESTAMP';//创建日期

    public $isDbData = false;

    public function __construct()
    {
        parent::__construct();
    }


    public function __get($name) {
        return $this->$name;
    }

    public function __set($name, $value) {
        if(!$this->isDbData){
            if(!in_array($name,$this->loadedFiled))$this->loadedFiled[] = $name;
        }

        $this->$name=$value;
        $this->arr[$name] = $value;
    }

    public  function table()
    {
        return 'tbl_course_appointment';
    }
    
    public  function key(){
        return 'courseAppointmentId';
    }


    
    public static  function hideField()
    {
        return array (  0 => 'ip',);
    }
            
    public static  function skipField()
    {
        return [];
    }
            
    public static  function noViewField()
    {
        return [];
    }
            
    public static  function jsonField()
    {
        return [];
    }
            
    public static  function noLoadField()
    {
        return array (  0 => 'uid',  1 => 'ip',);
    }
            
    public static  function deleteField()
    {
        return [];
    }
            
    public function className()
    {
        return 'CourseAppointment';
    }
    
    public  function field()
    {
        return array (  'courseAppointmentId' =>   array (    0 => 'INT',    1 => 11,    2 => 'ID',  ),  'courseId' =>   array (    0 => 'INT',    1 => 11,    2 => '课程@foreign::tbl_course;@search',  ),  'schoolId' =>   array (    0 => 'INT',    1 => 11,    2 => '机构@foreign::tbl_school;@search;',  ),  'uid' =>   array (    0 => 'INT',    1 => 11,    2 => '用户@foreign::tbl_user;@search;@noLoad;',  ),  'date' =>   array (    0 => 'DATE',    1 => 0,    2 => '预约日期@search;@noList;',  ),  'time' =>   array (    0 => 'VARCHAR',    1 => 15,    2 => '预约时间@search;@noList;',  ),  'dateAndTime' =>   array (    0 => 'DATETIME',    1 => 0,    2 => '预约时间',  ),  'mobile' =>   array (    0 => 'VARCHAR',    1 => 50,    2 => '手机@search;',  ),  'name' =>   array (    0 => 'VARCHAR',    1 => 100,    2 => '称呼@search;',  ),  'ip' =>   array (    0 => 'VARCHAR',    1 => 15,    2 => 'ip@noLoad;@hide;',  ),  'status' =>   array (    0 => 'TINYINT',    1 => 4,    2 => '状态@status;3::有效::@admin;4::核销;7::过期;88::删除::@admin;@search;',  ),  'created' =>   array (    0 => 'DATETIME',    1 => 0,    2 => '创建日期',  ),);
    }


}